﻿namespace Example.Logging
{
    using System.Diagnostics;

    using Castle.DynamicProxy;

    public sealed class LoggingInterceptor : IInterceptor
    {
        public void Intercept(IInvocation invocation)
        {
            if (null == invocation)
            {
                return;
            }

            Trace.TraceInformation("{0}.{1}", invocation.TargetType.FullName, invocation.Method);
            invocation.Proceed();
        }
    }
}